<template>
  <div class="m-[30px]">
    <DateSearch @getTime="getTime" class="mt-[30px]" />
    <ProjectMenu
      :searchVal="props.searchVal"
      :startTime="search.startTime"
      :endTime="search.endTime"
    />
  </div>
</template>

<script setup lang="ts">
import DateSearch from "@renderer/components/dateSearch/index.vue";
import ProjectMenu from "@renderer/components/projectMenu/index.vue";
import { ref } from "vue";
let props = defineProps({
  searchVal: {
    type: String,
    default: "",
  },
});

const search = ref({
  startTime: null,
  endTime: null,
});
const emit = defineEmits(["search"]);

// 获取时间段查询
function getTime(startTime, endTime) {
  search.value.startTime = endTime;
  search.value.endTime = startTime;
}
</script>

<style scoped lang="scss"></style>
